function lik=logLnorm(y,x,beta,sigma); 
% function lik=logLnorm(y,x,beta,sigma); 
% Compute the log-likelihood of the model given by 
% y(t)= X(t)*B + e(t) 
% e(t) ~ i.i.d N(0,sigma)  sigma is the variance 
[t,k]=size(x);
ehat=y-x*( beta(:) ); 
lik=t*log(sigma)/2 + t*log(2*pi)/2 + 0.5*(ehat'*ehat)/sigma; 
lik=-lik; 